package cn.vehicle.controller;

import cn.vehicle.biz.SystemConfigBiz;
import cn.vehicle.domains.vo.Result;
import cn.vehicle.domains.vo.req.systemConfig.UpdateSystemConfigReq;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import jakarta.validation.Valid;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/systemConfig")
@Slf4j
@Tag(name = "SystemConfigController", description = "配置管理相关接口")
public class SystemConfigController {

    @Resource
    private SystemConfigBiz systemConfigBiz;

    @PostMapping("/updateSystemConfig")
    @Operation(description = "修改系统配置信息")
    public Result<Void> updateSystemConfig(@Valid @RequestBody UpdateSystemConfigReq req) {
        systemConfigBiz.updateSystemConfig(req);
        return Result.success();
    }


}
